﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using QxFramework.Core;
using System;
public class Fire : EffectBase
{
    string followItemName = default;
    private Transform t;


    public override void OnDisplay(Vector3 pos, object arg = null)
    {
        base.OnDisplay(pos, arg);
        var info = arg as Tuple<string, float>;
        this.transform.localScale = Vector3.one * info.Item2;
        followItemName = info.Item1;
        t = ClockManager.Get<IItemSyncManager>().GetGameObjectByName(followItemName).transform;
        transform.SetParent(t);
        transform.localEulerAngles = new Vector3(0, 90, 0);
    }
    public void OnEnable()
    {
    //    if( ClockManager.Get<IItemSyncManager>().GetGameObjectByName(followItemName) == null){
     //       return;
      //  }
    }
}
